<?php 
require_once ('dbconfig.php');

$dbh = mysql_connect ( DB_HOST, DB_USER, DB_PASS ) or die ( mysql_error () );
mysql_select_db ( DB_NAME );

?>

<html>
<head>
<title>Add Moon to Database</title>
</head>
<body>

<?php 
$corpId = $_POST ['corpId'];
$systemName = $_POST ['systemName'];
$taxRate = $_POST ['taxRate'];
$planet = $_POST ['planet'];
$moon = $_POST ['moon'];

$sql = "insert into al_taxableMoons (alTmSystem,alTmPlanet,alTmMoon,alTmRate,alTmCorp)";
$sql .= " values('$systemName',$planet,$moon,$taxRate,$corpId)";

if (mysql_query ( $sql, $dbh )) {
				echo "record added <br>";
				echo "<a href=\"taxableMoons.php\">Back</a>";
			} else {
				die (mysql_error ());
			}
?>

</body>